#!/usr/bin/env fish
# use nvim as lua runtime
# https://vim.fandom.com/wiki/Vim_as_a_system_interpreter_for_vimscript
nvim -i NONE -esn -u NONE \
  -c "1pu=execute('luafile $argv[1]')" \
  -c "1,2d" \
  -c "%print" -c "qa!"
# The descriptions for 3 lines of '-c' commands is as follow:
# 1. execute lua file print output to buffer(after the first line)
# 2. delete the first two lines, they are empty lines
# 3. print current buffer to stdout and quit vim

# Bugs:
# not working for colors
